]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Fix fallout from notification changes
authorFlorian Müllner <fmuellner@gnome.org>
Mon, 21 Oct 2013 23:30:14 +0000 (01:30 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Fri, 25 Oct 2013 13:15:10 +0000 (14:15 +0100)
Commit 5f081b8f8d5c4 moved code without moving a helper function
used.

https://bugzilla.gnome.org/show_bug.cgi?id=710596

js/ui/messageTray.js
js/ui/notificationDaemon.js

index 75c3027f2533fa77566fe7e12b268709702c7ab2..1e891faecefe3627349b99f5b5975843e0355bfc 100644 (file)
@@ -280,10 +280,6 @@ const URLHighlighter = new Lang.Class({
     }
 });
 
-function strHasSuffix(string, suffix) {
-    return string.substr(-suffix.length) == suffix;
-}
-
 // NotificationPolicy:
 // An object that holds all bits of configurable policy related to a notification
 // source, such as whether to play sound or honour the critical bit.
index ddd390b5d4151cfd60eb8f0fa717c10fe51becd1..42dedbdafa7379b31d23f9206de52e0cb0b95965 100644 (file)
@@ -357,7 +357,7 @@ const FdoNotificationDaemon = new Lang.Class({
 
     _makeButton: function(id, label, useActionIcons) {
         let button = new St.Button({ can_focus: true });
-        let iconName = strHasSuffix(id, '-symbolic') ? id : id + '-symbolic';
+        let iconName = id.endsWith('-symbolic') ? id : id + '-symbolic';
         if (useActionIcons && Gtk.IconTheme.get_default().has_icon(iconName)) {
             button.add_style_class_name('notification-icon-button');
             button.child = new St.Icon({ icon_name: iconName });